//: C03:Menu2.cpp
// A menu using a switch statement
#include <iostream>

int main(void){
    using namespace std;
    bool quit = false;   // Flag for quitting
    while(quit == false){
        cout << "Select a, b, c or q to quit: ";
        char response;
        cin >> response;
        switch(response){
            case 'a': cout << "you chose 'a' " << '\n';
                break;
            case 'b': cout << "you chose 'b' " << '\n';
                break;
            case 'c': cout << "you chose 'c' " << '\n';
                break;
            case 'd': cout << "you chose 'd' " << '\n';
                break;
            case 'q': cout << "quitting menu" << '\n';
                quit = true;      
                break;
            default: cout << "Please use a, b, c or q!" << '\n';          
        }
    }
    return 0;
}
